void Gauss_Elimination(std::vector<std::vector<double> > &_A, 
                       std::vector<double> &_b);
void Gauss_Elimination_Main(std::vector<std::vector<double> > &_A);



void Gauss_Elimination(std::vector<std::vector<double> > &_A, std::vector<double> &_b)
{
    int i, j;
    int n = _A.size();
    std::vector<std::vector<double> > L(n, std::vector<double> (n, 0));
    std::vector<std::vector<double> > U(n, std::vector<double> (n, 0));
    Gauss_Elimination_Main(_A);
    Get_L(_A,L);
    Get_U(_A,U);
    Calculate_LU(L, U, _b);
}

void Gauss_Elimination_Main(std::vector<std::vector<double> > &_A)
{
    int i, j, k;
    int n = _A.size();
    for(k = 1; k < n; ++k)
    {
        for(i = k; i < n; ++i)
        {
            _A[i][k-1] =  _A[i][k-1] / _A[k-1][k-1];
        }
        for(i = k; i < n; ++i)
        {
            for(j = k; j < n; ++j)
            {
                _A[i][j] = _A[i][j] - _A[i][k-1] * _A[k-1][j];
            }
        }
    }
}
